#pragma once
#include "map.h"
#include "pot.h"
#include "player.h"
#include "gamePhase.h"
#define MAX_PLAYERS 6
enum GAME_STATE
{
	MAIN_MENU,
	NEW_POT,	
	ACTION_SELECTION,
	RESOLUTION,
	OUTCOME,
	SPLIT_THE_POT,
	OPTIONS,
	MAX_STATES
};

class Game
{
private:
	GAME_STATE state;

	int input;
	GamePhase * phases[MAX_STATES];
	Player thePlayers[MAX_PLAYERS];
	int cursorX, cursorY;

	bool potShuffled;

public:
	Pot thePot;
	bool running;
	//Default constructor
	Game ();
	~Game();

	//Game loop functions
	void handleInput(int a_input);
	void update(int timePassed);
	void draw();

	//Accessors
	bool isRunning();
	GAME_STATE getState(){return state;}
	void getCursorXY(int & a_x, int & a_y){a_y = cursorY; a_x = cursorX;}
	Player* getPlayer(int a_index){return &thePlayers[a_index];}

	//manipulators
	void setState(GAME_STATE a_state){state = a_state;}
};